﻿@model IEnumerable<QcRiverFlows.Models.Section>

@{
    ViewBag.Title = "Sections";
}

<h2>@ViewBag.Title</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Category.Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.River.Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Description)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Class)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Lenght)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Shuttle)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.FlowMin)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.FlowMax)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Portages)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.PutIn)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.TakeOut)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Map)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Category.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.River.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Description)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Class)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Lenght)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Shuttle)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.FlowMin)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.FlowMax)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Portages)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.PutIn)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TakeOut)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Map)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
            @Html.ActionLink("Details", "Details", new { id=item.Id }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.Id })
        </td>
    </tr>
}


<ul data-role="listview" data-inset="true">
    <li data-role="list-divider">Navigation</li>
    <li>@Html.ActionLink("Régions", "Index", "Regions")</li>
    <li>@Html.ActionLink("Catégories", "Index", "Categories")</li>
    <li>@Html.ActionLink("Rivières", "Index", "Rivers")</li>
</ul>
</table>
